From dfe2967675c8203f360234759e6c9ca7f44948a9 Mon Sep 17 00:00:00 2001 From: Ivan Diaz Date: Fri, 21 Nov 2025 17:13:40 -0500 Subject: [PATCH] watchcat: set default value for mmifacename to prevent argument shift Set mmifacename default to "null" instead of an empty string to avoid argument displacement when the value is not defined. Also remove leftover debug comments from previous commit. Signed-off-by: Ivan Diaz --- utils/watchcat/files/watchcat.init | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/watchcat/files/watchcat.init b/utils/watchcat/files/watchcat.init index a21712e1f5..dcaa8ece5b 100644 --- a/utils/watchcat/files/watchcat.init +++ b/utils/watchcat/files/watchcat.init @@ -38,8 +38,8 @@ config_watchcat() { config_get pingperiod "$1" pingperiod "60" config_get forcedelay "$1" forcedelay "60" config_get pingsize "$1" pingsize "standard" - config_get interface "$1" interface # CHEK only if need a default? - config_get mmifacename "$1" mmifacename # FIX HERE need a default? + config_get interface "$1" interface + config_get mmifacename "$1" mmifacename "null" config_get_bool unlockbands "$1" unlockbands "0" config_get addressfamily "$1" addressfamily "any" config_get script "$1" script @@ -73,7 +73,7 @@ config_watchcat() { append_string "warn" "pingperiod cannot be a negative value." "; " fi - if [ "$mmifacename" != "" ] && [ "$period" -lt 30 ]; then + if [ "$mmifacename" != "null" ] && [ "$period" -lt 30 ]; then append_string "error" "Check interval is less than 30s. For robust operation with ModemManager modem interfaces it is recommended to set the period to at least 30s." fi fi -- 2.30.2